/**
 * Created by lsx on 2017/5/12.
 */
define(['jquery', 'mui'], function ($, mui) {
    $('.save-btn')[0].addEventListener('tap', function (e) {
        $password = $('#password').val();
        $password_confirm = $('#password_confirm').val();
        $.ajax({
            dataType: 'json',
            data: {password: $password, password_confirm: $password_confirm},
            url: set_pay_password_save_url,
            success: function (res) {
                if (res.code === 1) {
                    mui.toast(res.msg);
                    //setTimeout("window.location.href=user_index_url", 1500);
                    setTimeout("history.back()", 500);

                } else {
                    mui.alert(res.msg)
                }
            }
        })
    })
});
